package com.xj.server;

import com.xj.entity.Record;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.id.IdentityGenerator;

import java.io.Serializable;

public class IdGenerator extends IdentityGenerator {

    @Override
    public Serializable generate(SharedSessionContractImplementor s, Object obj) {
        if (obj instanceof Record) {
            Record aaInventoryClassExtEntity2 = (Record) obj;
            return aaInventoryClassExtEntity2.getId();
        } else {
            return null;
        }
    }
}
